<script setup>
    import {ref} from "vue"
    import agent from '../mitt';
    // 准备响应式数据
    const msg = ref("")
    // 接收消息
    agent.on("toNiuLang", (val) => {
        msg.value = val
    })
</script>

<template>
    <div class="myRight">
        <p>织女</p>
        <p>接收到牛郎的消息：{{ msg }}</p>
    </div>
</template>

<style scoped>
    .myRight {
        height: 100px;
        text-align: center;
        background-color: rgb(48, 100, 177);
        flex: 1;
    }
</style>
